<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style type="text/css">
			#d1{
				width: 200px;
				height: 100px;
				background-color: #00FFFF;
				color: #000000;
				text-align: center;  
				line-height: 100px;
			}
			#d2{
				width: 200px;
				height: 50px;
				background-color: #008000;
				color: #000000;
				text-align: center; 
				padding-top: 30px;
				margin-top: 20px;
			}
			#d3{
				width: 200px;
				height: 50px;
				background-color: #800080;
				color: #000000;
				text-align: center; 
				padding-top: 30px;
				margin-top: 20px;
			}
			#d4{
				width: 200px;
				height: 50px;
				background-color: yellow;
				color: #000000;
				text-align: center; 
				padding-top: 30px;
				margin-top: 20px;
			}
			#d5{
				width: 200px;
				height: 50px;
				background-color: #057ED4;
				color: #000000;
				margin: 0 auto;
			}
		</style>
	</head>
	<body>
		文字垂直居中
		<!-- 
			水平居中
				text-align: center;
				 
			垂直居中
				line-height: 
				padding-top:
		 -->
		<div id="d1">
			内容,使用line-height
		</div>
		<div id="d2">
			内容,使用padding
		</div>
		<div id="d3">
			<span>影响span标签</span>
		</div>
		<div id="d4">
			<div>影响div标签</div>
		</div>
		<div id="d5">
			整个网页垂直+水平居中
		</div>
	</body>
</html>
